<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>订单打印,订单号[{$orderInfo.order_sn}]</title>
    <script src="/public/plugins/jquery.min.js?v=2.1.4"></script>
    <style>
        a {
            color: #666;
        }
        body {
            margin: 0px;
            padding: 0px;
        }
        .box {
            border: 0px solid #cccccc;
            font-size:14px;
            padding-bottom:30px;
        }
        .bar {
            position: fixed;
            bottom: 0px;
            text-align: right;
            font-size: 12px;
            border: 1px solid #ccc;
            margin-bottom: 0px;
            margin-top: 5px;
            padding: 2px;
            margin-right: 0px;
            background: #f4f4f4;
            height: 25px;
            width: 100%;
        }
        .noprint {
            border-top: 2px solid #ccc;
        }
        @media print {
            .noprint {
                display: none;
            }
        }
        .ddtable {
            width: 100%;
            border: 0px solid #e1ddd7;
        }
        .ddtable .title {
            heihht: 2em;
            line-height: 2em;
            background: #f4f4f4;
            border-bottom: 1px solid #e1ddd7;
        }
        .ddtable table {
            width: 100%;
            background-color: #f4f4f4;
            line-height: 25px;
            font-family: "Microsoft YaHei"
        }
        th {
            background-color: #fff;
        }
        td {
            background-color: #fff;
            padding: 0.4em 0.8em;
            font-size: 1em;
            color: #666;
        }
        .tdbgleft {
            background: #f4f4f4;
            font-size: 1em;
            color: #515151;
        }
        .tdbgleft td {
            background: #f4f4f4;
            font-size: 1.1em;
            color: #515151;
        }
    </style>
    <script type="text/javascript">
        function changesize(v) {
            if (v == 0) return;
            jQuery("#mybody").find("td").each(function () {
                jQuery(this)[0].style.fontSize = v + "px";
            });
        }
    </script>
</head>
<body>
<div id="mybody" class="box">
    <table cellpadding="0" border="0" cellspacing="0" class="ddtable" style="border-collapse: collapse" bordercolor="#979797">
        <tbody>
        <tr align="middle">
            <td class="title">
                <strong>订 单 信 息</strong>（订单编号：{$orderInfo.order_sn} <span style="width: 18%">下单时间：{$orderInfo.create_time|date="Y-m-d H:i:s",###}</span>）
            </td>
        </tr>
        <tr>
            <td style="height: 25px">
                <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#e1ddd7">
                    <tbody>
                    <tr class="tdbg">
                        <td style="width: 18%">
                            用 户 名：{$orderInfo.buyer_username}
                        </td>
                        <td style="width: 18%">
                            订单状态：{$orderInfo.order_status_text} {$orderInfo.shipping_status_text} {$orderInfo.pay_status_text}
                        </td>
                    </tr>
                    <tr class="tdbg">
                        <td style="width: 18%">
                            店铺:{$orderInfo.site_name}
                        </td>
                        <td style="width: 18%">
                            付款方式：{$orderInfo.pay_name}
                        </td>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr align="middle">
            <td>
                <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#e1ddd7">
                    <tbody>
                    <tr class="tdbg">
                        <td align="right" class="tdbgleft" width="90">收货人姓名：</td>
                        <td align="left">{$orderInfo.consignee}</td>
                        <td align="right" class="tdbgleft" width="90">收货人电话：</td>
                        <td align="left">{$orderInfo.tel_phone}</td>
                    </tr>
                    <tr class="tdbg" valign="top">
                        <td align="right" class="tdbgleft" width="90">收货人地址：</td>
                        <td align="left">{$orderInfo.area_text} {$orderInfo.address}</td>
                        <td align="right" class="tdbgleft" width="90">邮政编码：</td>
                        <td align="left">{$orderInfo.zip_code}</td>
                    </tr>
                    <tr class="tdbg" valign="top">
                        <td align="right" class="tdbgleft" width="90">
                            订单附言:
                        </td>
                        <td align="left" colspan="3">
                            {$orderInfo.order_message}
                        </td>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#e1ddd7">
                    <tbody>
                    <tr align="middle" class="tdbgleft">
                        <td align="left" width="450">商 品 名 称</td>
                        <td align="left" width="50">单位</td>
                        <td align="left" width="50">数量</td>
                        <td align="left" width="100">单价</td>
                        <td align="left" width="100">小计</td>
                        <td align="left" width="250">备注</td>
                    </tr>
                    {volist name="orderInfo.item_list" id="vo"}
                    <tr align="middle" class="tdbg">
                        <td align="left" width="400">
                            <img align="left" src="{$vo.goods_thumb|default='/public/nopic.gif'}" style="width:5em;height:4.75em;margin:4px;"/>
                            {$vo.goods_name} {$vo.sku_name}
                        </td>
                        <td align="left" width="50">{$vo.goods_unit}</td>
                        <td align="left" width="50">{$vo.goods_num}</td>
                        <td align="left" width="100">
                            {gt name="vo.unit_price" value="0"}
                            {$vo.unit_price}元<br/>
                            {/gt}
                            {gt name="vo.pay_point" value="0"}
                            {$vo.pay_point}积分
                            {/gt}
                        </td>
                        <td align="left" width="100">
                            {gt name="vo.pay_price" value="0"}
                            {$vo.pay_price}元<br/>
                            {/gt}
                            {gt name="vo.pay_point" value="0"}
                            {$vo['pay_point']*$vo['goods_num']}积分
                            {/gt}
                        </td>
                        <td align="left" width="200">{$vo.promotion_type_text}</td>
                    </tr>
                    {/volist}
                    </tbody>
                    <tbody>
                    <tr class="tdbg">
                        <td align="left" colspan="4">
                            商品总价:{$orderInfo.goods_amount}元
                            {gt name="orderInfo.shipping_fee" value="0"}
                            +配送费:{$orderInfo.shipping_fee|default=0}元
                            {/gt}
                            {gt name="orderInfo.card_price" value="0"}
                            -代金券:{$orderInfo.card_price|default=0}元
                            {/gt}
                            {gt name="orderInfo.promotion_amount" value="0"}
                            -优惠金额:{$orderInfo.promotion_amount|default=0}元
                            {/gt}
                            <span class="text-danger">=订单金额:{$orderInfo.order_price}元</span>
                        </td>
                        <td align="left" colspan="2">
                            应付款：{$orderInfo.order_price}元
                            -退款:{$orderInfo.refund_amount}元
                            {gt name="orderInfo.refund_amount" value="0"}
                            -退款:{$orderInfo.refund_amount}元<br/>
                            {/gt}<br/>
                            <span class="text-danger">实付款：{$orderInfo.pay_price}元</span>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<div class="noprint bar">
    打印字号：
    <select name="DrpPsize" id="DrpPsize" onChange="changesize(this.value);">
        <option value="0">请选择字号...</option>
        <option value="8">8px</option>
        <option value="9">9px</option>
        <option value="10">10px</option>
        <option value="11">11px</option>
        <option value="12">12px</option>
        <option value="13">13px</option>
        <option selected value="14">14px</option>
        <option value="15">15px</option>
        <option value="16">16px</option>
        <option value="17">17px</option>
        <option value="18">18px</option>
        <option value="19">19px</option>
        <option value="20">20px</option>
        <option value="21">21px</option>
        <option value="22">22px</option>
        <option value="23">23px</option>
        <option value="24">24px</option>
        <option value="25">25px</option>
        <option value="26">26px</option>
        <option value="27">27px</option>
        <option value="28">28px</option>
        <option value="29">29px</option>
        <option value="30">30px</option>
        <option value="31">31px</option>
        <option value="32">32px</option>
        <option value="33">33px</option>
        <option value="34">34px</option>
        <option value="35">35px</option>
        <option value="36">36px</option>
        <option value="37">37px</option>
        <option value="38">38px</option>
        <option value="39">39px</option>
        <option value="40">40px</option>
        <option value="41">41px</option>
        <option value="42">42px</option>
        <option value="43">43px</option>
        <option value="44">44px</option>
        <option value="45">45px</option>
        <option value="46">46px</option>
        <option value="47">47px</option>
        <option value="48">48px</option>
        <option value="49">49px</option>
        <option value="50">50px</option>
    </select>
    <input type="button" value=" 开始打印 " onclick="window.print()" class="button"/>
</div>
</body>
</html>